package modelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class PersonTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class PersonTest
{
    private modelLayer.Person person1;

    /**
     * Default constructor for test class PersonTest
     */
    public PersonTest()
    {
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void testName()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals("John", person1.getName());
    }

    @Test
    public void testAddress()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals("Aalborg North", person1.getAddress());
    }

    @Test
    public void testID()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals(0, person1.getID());
    }

    @Test
    public void testPost()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals("1", person1.getPostalCode());
    }

    @Test
    public void testCity()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals("Aalborg", person1.getCity());
    }

    @Test
    public void testPhone()
    {
        modelLayer.Person person1 = new modelLayer.Person("John", "Aalborg North", "1", "Aalborg", "111");
        assertEquals("111", person1.getPhone());
    }
}






